package ar.com.personalTravellers.daos.impl;

import ar.com.personalTravellers.beans.Room;
import ar.com.personalTravellers.daos.RoomDAO;
import com.angel.arquitectura.model.objectId.ObjectId;
import com.angel.dao.generic.impl.GenericSpringHibernateDAO;

import java.util.Collection;

/**
 *
 * @author William
 */
public class RoomSpringHibernateDAO extends GenericSpringHibernateDAO<Room, ObjectId> implements RoomDAO {

    public RoomSpringHibernateDAO() {
        super(Room.class, ObjectId.class);
    }

    public Room findUniqueByName(String name) {
        return super.findUnique("name", name);
    }

    public Collection<Room> findAllByDescription(String description) {
        return super.findAll("description", description);
    }
}